added some development tools
[windows-sources.git] / developer / Samples / NET 4.6 / Samples for Parallel / Sudoku / Sudoku_CSharp / Controls / NoFlickerPanel.cs
blobddaf380fdafe6ca1d89cf3a661b64c0114953888
1 //--------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // File: NoFlickerPanel.cs
6 //
7 // Description: A double-buffering and redraw-on-resizing panel.
8 //
9 //--------------------------------------------------------------------------
11 using System.Drawing;
12 using System.Windows.Forms;
14 namespace Microsoft.ParallelComputingPlatform.ParallelExtensions.Samples.Sudoku.Controls
16 /// <summary>A derived panel that uses double buffering to prevent flicker.</summary>
17 [ToolboxBitmap(typeof(Panel))]
18 internal class NoFlickerPanel : Panel
20 /// <summary>Initializes the panel.</summary>
21 public NoFlickerPanel()
23 SetStyle(
24 ControlStyles.DoubleBuffer |
25 ControlStyles.AllPaintingInWmPaint |
26 ControlStyles.UserPaint |
27 ControlStyles.ResizeRedraw |
28 ControlStyles.SupportsTransparentBackColor, true);